package com.mutual.assistance.utils;

/**
 * @author chenyuxin
 * @version 1.0
 * @description TODO
 * @date 2023/4/30 0:21
 */
public class ThreadLocalUtils {

    private static final ThreadLocal<String> THREAD_LOCAL_TOKEN = new ThreadLocal<>();

    public static void saveToken(String key){
        THREAD_LOCAL_TOKEN.set(key);
    }


    public static String getToken(){
        return THREAD_LOCAL_TOKEN.get();
    }


    public static void removeToken(){
        THREAD_LOCAL_TOKEN.remove();
    }

}
